import java.util.Random;
import java.util.Scanner;

public class test {
    public static void main(String[] args) {

    }
    public static void main12(String[] args) {
        //猜数字
        Scanner red=new Scanner(System.in);
        Random random=new Random();
        int ranNum=random.nextInt(100);
        while(true){
            System.out.println("请输入要猜的数字");
            int a=red.nextInt();
            if(a>ranNum){
                System.out.println("猜大了");
            } else if(a<ranNum) {
                System.out.println("猜小了");
            } else{
                System.out.println("猜对了是"+ranNum+"!!!");
                break;
            }
        }
    }
    public static void main10(String[] args) {
            Scanner in = new Scanner(System.in);
            // 注意 hasNext 和 hasNextLine 的区别
            while(in.hasNext()){
                int a=in.nextInt();
                int i=0;
                for(i=0;i<a;i++) {
                    for(int j=0;j<a;j++){
                        if(i==j){
                            System.out.print("*");
                        }
                        else if(i+j==a-1){
                            System.out.print("*");
                        }
                        else{
                            System.out.print(" ");
                        }
                    }
                    System.out.print("\n");
                }
            }
        }
    public static void main9(String[] args) {
        //求2个整数的最大公约数
        Scanner scan=new Scanner(System.in);
        int a=scan.nextInt();
        int b=scan.nextInt();
        int c=0;
        while((c=a%b)!=0){
            a=b;
            b=c;
        }
        System.out.println(b);
    }
    public static void main8(String[] args) {
        //二进制1的个数
        Scanner scan=new Scanner(System.in);
        int a=scan.nextInt();
        int count=0;
        for (int i = 0; i <=31 ; i++) {
            if(((a>>i)&1)==1){
                count++;
            }
        }
        System.out.println(count);
    }
    public static void main7(String[] args) {
        Scanner scan=new Scanner(System.in);
        int a=scan.nextInt();
        int j=0;
        for (  j = 2; j <= Math.sqrt(a); j++) {
            if(a%j==0){
                break;
            }
        }
        if(j>Math.sqrt(a)){
            System.out.println("是素数");
        }
        else{
            System.out.println("不是素数");
        }
    }

    public static void main6(String[] args) {
        //输出1000到2000之间所有闰年
        for (int i = 1000; i <=2000 ; i++) {
            if((i%4==0&&i%100!=0)||i%400==0){
                System.out.println(i);
            }
        }
    }
    public static void main5(String[] args) {
        //1到100之间数字9出现的次数
        int count=0;
        for (int i = 1; i <=100 ; i++) {
            if((i%10)==9){
                System.out.println(i);
                count++;
            }
            else if(i/10==9){
                System.out.println(i);
                count++;
            }
            System.out.println(count);

        }
    }
    public static void main4(String[] args) {
        //打印1到100之间所有的素数
        int i,j;
        for ( i = 2; i <=100 ; i++) {
            for ( j = 2; j <= Math.sqrt(i); j++) {
                if(i%j==0){
                 break;
                }
            }
            if(j>Math.sqrt(i)){
                System.out.println(i);
            }
        }
    }
    public static void main3(String[] args) {
        //输入
        Scanner scan=new Scanner(System.in);
//        int n=scan.nextInt();
//        System.out.println(n);
//        long m= scan.nextLong();
//        System.out.println(m);
          String a=scan.nextLine();//读取全部输入
        System.out.println(a);
        String b=scan.next();//读取到空格停止
        System.out.println(b);




    }

    public static void main2(String[] args) {
        int a=1;
        int b=2;
        int c=3;
        System.out.println(a+" "+b+" "+c);
    }
    public static void main1(String[] args) {
        int i=0;
        while(i<=100){
            if(i%3!=0||i%5!=0) {
               i++;
                continue;
            }
            System.out.println(i);
            i++;
        }
    }
}
